<?php
	require '../../feed/config/config.php';
	session_start();
	$ConnfigRs=mysqli_fetch_array(mysqli_query($con,"select * from config where id='1'"));
	if(empty($_SESSION['member'])){
	    echo "<script>location='../index.php';</script>";
	}
	if($_GET['ops']=="logout"){
	    session_destroy();
	    session_start();
	    $_SESSION['url']="https://edu.yudur.cn/index/index.php";
	    echo "<script>alert('您已成功退出');location='../index.php';</script>";
	}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8"/>
    <title>社团中心</title>
    <script type="text/javascript" src="../js/base-loading.min.js"></script>
    <script type="text/javascript" src="../js/layui.js"></script>
    <link rel="stylesheet" href="../css/style.css"/>
    <link rel="stylesheet" href="../css/layui.css"/>
  </head>
  <body>
    <div class="s_header w">
      <div class="s_header_top w">
        <div class="header_top w1000 auto">
          <div class="header_top_fl fl">欢迎访问<?php echo $ConnfigRs['name'];?></div>
          <div class="header_top_fr fr"><span class="header_email dib"></span><span class="header_tel dib"></span>
            <div class="cb"></div>
          </div>
          <div class="cb"></div>
        </div>
      </div>
      <div class="s_header_nav w">
        <div class="header_nav w1000 auto">
          <div class="logo fl"><a href="index.html"><img src="http://www.huayu.edu.cn/template/huayu/listimages/logo.png" alt=""/></a></div>
        </div>
      </div>
    </div>
    <div class="banner">
      <div id="banner" class="dv_5"><a href="" style=" background:url(../images/hy.png) center center no-repeat; display: block; z-index: 1; " class="d1"></a><a href="" style=" background:url(images/banner2.png) center center no-repeat; display: block; z-index: 1; " class="d1"></a><a href="" style=" background:url(images/banner3.png) center center no-repeat; display: block; z-index: 1; " class="d1"></a>
      </div>
    </div>
    <div class="s_cen w">
      <div class="center w1000 auto">
          <br />
                <p><a href="../index.php">首页</a> / 社团中心</p>
              <br /><br />
             <h2>我的社团</h2><hr /><br />
              <?php
                    $club=mysqli_query($con,"select * from clubUser where user='".$_SESSION['member']."'");
        			while($clubRs=mysqli_fetch_array($club)){
        			    $rs=mysqli_fetch_array(mysqli_query($con,"select * from club where id='".$clubRs['clubId']."'"));
        			    if($clubRs['id']!=""){
        			        $clubIdentityRs=mysqli_fetch_array(mysqli_query($con,"select * from clubIdentity where id='".$clubRs['identityId']."'"));
        			        if($rs['state']=="0"){
        			            $state="待审核";
        			        }elseif($rs['state']=="1"){
        			            $state="正常";
        			        }elseif($rs['state']=="-1"){
        			            $state="以封禁或已注销";
        			        }
        			        echo "社团名称：<a href='./club.php?clubId=".$rs['id']."'>".$rs['name']."</a> | 社团身份：".$clubIdentityRs['identityName']." | 创建时间：".$rs['regTime']."  | 社团邀请码：".$rs['addKey']." | 状态：".$state."<br />";
        			    }
        			}
        			echo "暂无更多！";
                  ?>
               
                  <br /><br />
                  <br /><br />
             <h2>社团服务</h2><hr /><br />
            <div class="jqal_bom mychgPic">
                <div align='center'>
                    <a href='./joinclub.php'><button type='button' class='layui-btn layui-btn-normal'>加入社团</button></a> 
                    &nbsp;&nbsp;
                    <a href='./addclub.php'><button type='button' class='layui-btn layui-btn-normal'>新建社团</button></a>
                </div>
            </div>
      </div>
    </div>
    <div class="s_footer w">
      <div class="footer w1000 auto">
        <div class="footer_fl fl">
          <div class="footer_logo"><a href=""><img src="http://www.huayu.edu.cn/template/huayu/images/logo.png"  alt="" width="100%"/></a></div>
          <div class="footer_line"></div>
          <div class="footer_fl_ul">
            
          </div>
          <div class="cb"></div>
          <div class="footer_fl_record"></div>
        </div>
        <div class="footer_fr fr">
          <div class="footer_fr_top"></div>
          <div class="footer_line"></div>
         
          <div class="footer_from">｜<a href="" target="_blank">XXX</a></div>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="../js/jquery-1.8.1.min.js"></script>
    <!--首页banner特效-->
    <script type="text/javascript" src="../js/banner.js"></script>
    <script type="text/javascript" src="../js/main.js"> </script>
    <script type="text/javascript" src="../js/jquery.SuperSlide.2.1.1.js"></script>
</body>
</html>